function lfmBehaviouralTraining(ExpGroup)
runThresh=0.001;
runingPerct=[];
timeBetweenCylinders={};
avTimeBetweenCylinders=[];
avRunningBetweenCylinders={};
for gnd=1:length(ExpGroup)
   data=load_lvd(['\\KELLER-RIG2-AUX\tempData\S1-T' num2str(ExpGroup(gnd)) '.lvd']);
   [~,velM,~,~,~,~]=get_vel_ind_from_adata(data);
   running=smooth2(velM,1000);
   runingPerct(gnd)=(sum(-velM>runThresh)/length(velM))*100;
   cylinderOnsets=find(diff(round(data(11,:)))==5);
   timeBetweenCylinders{gnd}=diff(cylinderOnsets/1000);
   avTimeBetweenCylinders=mean(timeBetweenCylinders{gnd});
   for hnd=1:length(cylinderOnsets)-1
        avRunningBetweenCylinders{gnd}(hnd)=mean(running(cylinderOnsets(hnd)+1000:cylinderOnsets(hnd+1)));
   end
end

lwin=500;
rwin=2000;
lickData=data(8,:);
ddd=round(data(9,:));
aaa=find(diff(ddd)==5);
aaa(aaa+rwin>length(ddd))=[];
aaa(aaa-lwin<1)=[];
mat=[];
for hnd=1:length(aaa)
    mat(hnd,:)=lickData(aaa(hnd)-lwin:aaa(hnd)+rwin);
end
figure;
rectangle('position',[lwin 0 500 max(mat(:))],'facecolor',[1 0.85 0.9],'edgecolor','none')
hold on
rectangle('position',[lwin+500 0 100 max(mat(:))],'facecolor',[0 1 0],'edgecolor','none')
plot(mat','col',[0.5 0.5 0.5])
plot(mean(mat,1),'k','linewidth',2)
figure;imagesc(-mat)
set(gca,'clim',[-3.5 0])

[velP,velM,velP_ind,velM_ind,velP_raw,velM_raw]=get_vel_ind_from_adata(data);
lwin=2000;
rwin=5000;
running=smooth2(velM,1000);
% running=velM;
ddd=round(data(9,:));
aaa=find(diff(ddd)==5);
aaa(aaa+rwin>length(ddd))=[];
aaa(aaa-lwin<1)=[];
mat=[];
for hnd=1:length(aaa)
    mat(hnd,:)=abs(running(aaa(hnd)-lwin:aaa(hnd)+rwin));
end
figure;
rectangle('position',[lwin 0 500 0.02],'facecolor',[1 0.85 0.9],'edgecolor','none')
hold on
rectangle('position',[lwin+500 0 100 0.02],'facecolor',[0 1 0],'edgecolor','none')
plot(mat','col',[0.5 0.5 0.5])
plot(mean(mat,1),'k','linewidth',2)
ylim([0 0.02])
figure;imagesc(mat)
set(gca,'clim',[0 0.02])
colorbar